package com.ruoyi.web.tdmdata.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdmdata.mapper.TdmXiaoHuaXiTongMapper;
import com.ruoyi.web.tdmdata.domain.TdmXiaoHuaXiTong;
import com.ruoyi.web.tdmdata.service.ITdmXiaoHuaXiTongService;

/**
 * ID-05 -21 -34 消化系统药物Service业务层处理
 * 
 * @author ly
 * @date 2022-03-14
 */
@Service
public class TdmXiaoHuaXiTongServiceImpl implements ITdmXiaoHuaXiTongService 
{
    @Autowired
    private TdmXiaoHuaXiTongMapper tdmXiaoHuaXiTongMapper;

    /**
     * 查询ID-05 -21 -34 消化系统药物
     * 
     * @param id ID-05 -21 -34 消化系统药物主键
     * @return ID-05 -21 -34 消化系统药物
     */
    @Override
    public TdmXiaoHuaXiTong selectTdmXiaoHuaXiTongById(Long id)
    {
        return tdmXiaoHuaXiTongMapper.selectTdmXiaoHuaXiTongById(id);
    }

    /**
     * 查询ID-05 -21 -34 消化系统药物列表
     * 
     * @param tdmXiaoHuaXiTong ID-05 -21 -34 消化系统药物
     * @return ID-05 -21 -34 消化系统药物
     */
    @Override
    public List<TdmXiaoHuaXiTong> selectTdmXiaoHuaXiTongList(TdmXiaoHuaXiTong tdmXiaoHuaXiTong)
    {
        return tdmXiaoHuaXiTongMapper.selectTdmXiaoHuaXiTongList(tdmXiaoHuaXiTong);
    }

    /**
     * 新增ID-05 -21 -34 消化系统药物
     * 
     * @param tdmXiaoHuaXiTong ID-05 -21 -34 消化系统药物
     * @return 结果
     */
    @Override
    public int insertTdmXiaoHuaXiTong(TdmXiaoHuaXiTong tdmXiaoHuaXiTong)
    {
        tdmXiaoHuaXiTong.setCreateTime(DateUtils.getNowDate());
        return tdmXiaoHuaXiTongMapper.insertTdmXiaoHuaXiTong(tdmXiaoHuaXiTong);
    }

    /**
     * 修改ID-05 -21 -34 消化系统药物
     * 
     * @param tdmXiaoHuaXiTong ID-05 -21 -34 消化系统药物
     * @return 结果
     */
    @Override
    public int updateTdmXiaoHuaXiTong(TdmXiaoHuaXiTong tdmXiaoHuaXiTong)
    {
        tdmXiaoHuaXiTong.setUpdateTime(DateUtils.getNowDate());
        return tdmXiaoHuaXiTongMapper.updateTdmXiaoHuaXiTong(tdmXiaoHuaXiTong);
    }

    /**
     * 批量删除ID-05 -21 -34 消化系统药物
     * 
     * @param ids 需要删除的ID-05 -21 -34 消化系统药物主键
     * @return 结果
     */
    @Override
    public int deleteTdmXiaoHuaXiTongByIds(Long[] ids)
    {
        return tdmXiaoHuaXiTongMapper.deleteTdmXiaoHuaXiTongByIds(ids);
    }

    /**
     * 删除ID-05 -21 -34 消化系统药物信息
     * 
     * @param id ID-05 -21 -34 消化系统药物主键
     * @return 结果
     */
    @Override
    public int deleteTdmXiaoHuaXiTongById(Long id)
    {
        return tdmXiaoHuaXiTongMapper.deleteTdmXiaoHuaXiTongById(id);
    }
}
